home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_oth / libry31a / libry1.doc < prev    next >
Text File  |  1987-01-16  |  4KB  |  80 lines

  1. .pn 1
  2. .pa
  3.                       REQUIREMENTS AND CONVENTIONS
  4.  
  5. LIBRY  is  an indexed collection of object modules that can be linked to
  6. other FORTRAN object  modules.   An  object  module  is  a  binary  file
  7. produced  by  a  compiler  that contains machine instructions, data, and
  8. linker flags.  LIBRY contains object modules written in  both  assembler
  9. and  FORTRAN.   The  linker  will take the object module created by your
  10. FORTRAN compiler, add to it what it needs  from  LIBRY,  and  create  an
  11. executable  module.   In  order  to run any program, you must convert it
  12. through these steps into an executable module (unless  you  are  running
  13. interpretive  BASIC).   LIBRY  is  also  compatible  with  a  few  other
  14. programming languages;  however, BASIC is not one of these.  If all  you
  15. have is BASIC don't bother reading any further.  LIBRY is only available
  16. in object module form (the source codes  are  not  available  under  any
  17. circumstances).
  18.  
  19. On  the  PC  LIBRY  is contained in the file LIBRY.LIB.  On the HP-1000F
  20. LIBRY is contained  in  the  file  %LIBRY.   On  the  HP-A900  LIBRY  is
  21. contained in the file LIBRY.REL.
  22.  
  23. In  order  to  produce  a  compatible  object  module,  you  must have a
  24. Microsoft FORTRAN compiler (version 3.31 or  later)  or  HP  FTN7X.   In
  25. order  to  link  your object module and LIBRY, you must have a Microsoft
  26. linker (LINK version 3.0 or later - I don't know what versions  of  LINK
  27. that  come  with  DOS  are  compatible  - you get LINK when you purchase
  28. FORTRAN anyway) or HP LOADR or LINK.  Your LINK  (or  DOS)  manual  will
  29. tell  you  how  to access a library.  Refer to the LOADR or LINK manuals
  30. for HP applications.
  31.  
  32. If you are using a PC you also need two other libraries that  come  with
  33. Microsoft  FORTRAN  (FORTRAN.LIB  and MATH.LIB).  Do not attempt to link
  34. LIBRY.LIB with an object module created by a FORTRAN compiler other than
  35. Microsoft's.   Do  not  attempt  to link LIBRY.LIB with an object module
  36. created by anyone's BASIC compiler.  Do not attempt  to  link  LIBRY.LIB
  37. with  either of the two optional math libraries that come with Microsoft
  38. FORTRAN (8087.LIB or ALTMATH.LIB) as these have some  unidentified  bugs
  39. in them.
  40.  
  41. If  you  are  using  Microsoft  FORTRAN  don't  use any of the following
  42. metacommands  in  your   FORTRAN   source   code:    $LARGE,   $DECMATH,
  43. $NOFLOATCALLS,  or  $STORAGE  as  they  will  make  your  object  module
  44. incompatible with LIBRY.LIB.
  45.  
  46. All integers must be of the type INTEGER*2.  Put
  47.  
  48.           IMPLICIT INTEGER*2 (I-N)
  49.  
  50. in EVERY program segment (this greatly increases speed too).   For  some
  51. unknown  reason,  the  $STORAGE:2  command does not work as it should in
  52. Microsoft FORTRAN.  All reals must be of the type REAL*4.  Put
  53.  
  54.           IMPLICIT REAL*4 (A-H,O-Z)
  55.  
  56. in EVERY program segment.  All double precision reals  must  be  of  the
  57. type REAL*8.  Put
  58.  
  59.           IMPLICIT REAL*8 (A-H,O-Z)
  60.  
  61. in each program segment where double precision reals are used.  Remember
  62. that all double precision constants must have a "D" in them in order  to
  63. allocate  the  proper  space (don't pass "0." as a constant to a routine
  64. expecting a double precision real - use "0.D0").  All logicals  must  be
  65. of the type LOGICAL*2.  Character variables can be of any length (I hate
  66. FORTRAN compilers that permit only fixed length character variables so I
  67. do all character manipulation in assembler).
  68.  
  69. If  you  are  using  a  PC  you  don't  need  a  math coprocessor (Intel
  70. 8087/80287) in order to run a program linked with LIBRY;  but it makes a
  71. TREMENDOUS  difference  (a  factor  of  120  or  so  for  floating point
  72. operations).  The  vector  emulations  will  run  even  without  a  math
  73. coprocessor;  but in that case the speed is already so slow that nothing
  74. will help.  The improvement in speed with the vector  emulations  varies
  75. greatly   depending   on  the  relative  speed  of  your  processor  and
  76. coprocessor (not MHz speed but MIPS and FLOPS - a 5MHz 80286 is quite  a
  77. bit  faster than a 5MHz 8086 while a 5MHz 8087 is just as fast as a 5MHz
  78. 80287).  The greatest improvement is  realized  on  a  PC  with  a  5MHz
  79. 8086/8087 pair;  and the least improvement is realized on an AT.
  80.